//导入模块
let axios = require('../utils/axios');
module.exports = {
  //1.验证用户名是否存在：传统
  checkName(username) {
    let url = 'http://123.56.83.71:2004/user/checkname';
   return axios.get(url,{username});
  },
  //2.注册：传统
  reg(username,password){
    let url = 'http://123.56.83.71:2004/user/reg';
    return axios.post(url,{username,password},1);
  },
  //3.登陆：传统
  login(username,password){
    let url = 'http://123.56.83.71:2004/user/login';
    return axios.get(url,{username,password});
  },
  //4.微信小程序登陆方式
  wxlogin(code){
    let url = 'http://123.56.83.71:2004/user/wxlogin';
    return axios.post(url,{code});
  }
}